<center>
{% if user.is_authenticated %}
    <p>{{ user.username }} 已登录</p>
    <form method="post" action="/accounts/logout/">
        <input type="hidden" name="username" value="{{ user.username }}" />
        <input type="submit" value="注销" />
    </form>
{% else %}
    <p>未登录</p>
    <form method="post" action="/accounts/login/">
	    <table>
	        <tr>
	            <td>帐号</td>
	            <td>{{ form.username }}</td>
	        </tr>
	        <tr>
	            <td>密码</td>
	            <td>{{ form.password }}</td>
	        </tr>
	    </table>
	    <input type="submit" value="登录" />
	    <input type="hidden" name="next" value="{{ next }}" />
    </form>
{% endif %}
</center>
